-
Notifications
You must be signed in to change notification settings - Fork 7.7k
scripts/build: improve whitespace / empty parameter handling in syscall scripts #87633
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Hello @lonkaars, and thank you very much for your first pull request to the Zephyr project! |
@lonkaars thanks for this. This can help to see of we can make a test-case / update existing test case to ensure the problem is indeed fixed as well as ensureing there are no side-effects. |
I'm currently working in a private repository so I can't share the original code that this fix is for. I've created a twister test case in my (local) Zephyr fork clone with the following function signature, which fails in the same way: __syscall void
test(int foo); Should I add While making the test case I also found |
I was assuming so.
would be nice to have as part of this PR.
Making it part of this PR is fine. |
Looking over the commit history on |
parse_syscalls.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the work
Syscall regex matches may include whitespace characters other than space (i.e. `\n` or `\t`), which causes `gen_syscalls.py` to fail. This mainly affects long system call signatures wrapped onto multiple lines (e.g. by code formatter). This change replaces all successive whitespace in the regex match groups with a single space. Signed-off-by: Loek Le Blansch <loek.le-blansch.pv@renesas.com>
|
This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time. |
This commit adds a test for whitespace in syscall declaration function signatures. Signed-off-by: Loek Le Blansch <loek.le-blansch.pv@renesas.com>
This reverts commit 1993ea0 because the `parse_syscalls.py` script has been modified to not output whitespace characters other than spaces in the generated JSON file. Signed-off-by: Loek Le Blansch <loek.le-blansch.pv@renesas.com>
|
Syscall regex matches may include whitespace characters other than space (i.e.
\n
or\t
), which causesgen_syscalls.py
to fail. This mainly affects long system call signatures wrapped onto multiple lines (e.g. by code formatter). This change replaces all successive whitespace in the regex match groups with a single space.